package com.pf.dto;

import com.pf.selection.annotation.SelectionFieldEcho;
import com.pf.selection.annotation.SelectionFieldSort;
import com.pf.selection.annotation.convert.SimpleConverter;
import com.pf.selection.annotation.sort.AuditStatusSelectionEchoSort;
import com.pf.selection.constant.ConverterConstant;
import com.pf.selection.enums.SelectionEchoReturnType;
import com.pf.selection.enums.SelectionSortEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author PanFei
 * @version 1.0.0
 * @createTime 2023/3/30 20:13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuditTaskDTO {

    /**
     * 数据id
     */
    private Integer id;

    /**
     * 准则类型
     */
    @SelectionFieldEcho(converterKey = ConverterConstant.CRITERIA_TYPE, converter = SimpleConverter.class)
    private String criteriaType;

    /**
     * 任务名称
     */
    @SelectionFieldEcho(alias = "taskNameInfo", returnType = SelectionEchoReturnType.LABEL)
    private String taskName;

    /**
     * 任务状态
     */
    @SelectionFieldEcho
//    @SelectionFieldSort(sortBy = SelectionSortEnum.FIELD_VALUE_SORT, fieldValueSort = {"Open", "Close"})
    @SelectionFieldSort(sortBy = SelectionSortEnum.CUSTOM_SORT, customSort = AuditStatusSelectionEchoSort.class)
    private String taskStatus;

    /**
     * 备注
     */
    private String remark;

}
